﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="Studio77.GuessTheWordsWin8.Pages.GiftPackage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Studio77.GuessTheWordsWin8.Pages"
    xmlns:common="using:Studio77.GuessTheWordsWin8.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>

        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">My Application</x:String>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Viewbox>
		<VisualStateManager.VisualStateGroups>
<!-- Visual states reflect the application's view state -->
			<VisualStateGroup x:Name="ApplicationViewStates">
				<VisualState x:Name="FullScreenLandscape"/>
				<VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
				<VisualState x:Name="FullScreenPortrait">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>

                <!-- The back button and title have different styles when snapped -->
				<VisualState x:Name="Snapped">
					<Storyboard>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
							<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Grid Style="{StaticResource LayoutRootStyle}" Background="{StaticResource NormalBackground}" Height="768" Width="1366">
			<Grid.RowDefinitions>
				<RowDefinition Height="140"/>
				<RowDefinition Height="*"/>
			</Grid.RowDefinitions>

			<!-- Back button and page title -->
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
				<TextBlock x:Name="pageTitle" Grid.Column="1" Text="获取新手礼包" Style="{StaticResource PageHeaderTextStyle}"/>
			</Grid>
			<Viewbox HorizontalAlignment="Right" Width="346" Height="88" VerticalAlignment="Top" Margin="0,24,16,0">
				<Grid Height="120" Width="472">
					<Image Margin="0,4,356,0" Source="ms-appx:///Images/title_feng.png" Stretch="Fill" Width="116" Height="116"/>
					<Image Margin="116,2,238,0" Source="ms-appx:///Images/title_kuang.png" Stretch="Fill" Width="118" Height="118"/>
					<Image Margin="233,0,121,0" Source="ms-appx:///Images/title_tian.png" Stretch="Fill" Width="118" Height="120"/>
					<Image Margin="354,2,0,0" Source="ms-appx:///Images/title_zi.png" Stretch="Fill" Width="118" Height="118"/>

				</Grid>

			</Viewbox>
			<Grid Margin="185,104,188,300" Grid.Row="1">
				<TextBlock HorizontalAlignment="Left" Height="224" Margin="151,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="842" FontSize="48">
					<Run Text="前往应用市场，并给五星好评即可免费获取"/>
					<Run Foreground="Yellow" FontSize="96" Text="50"/>
					<Run Text="个提示道具"/>
					<Run Text="。"/>
				</TextBlock>
				<Image Margin="0,0,847,78" Source="ms-appx:///Images/Tips.png" Stretch="Fill"/>

			</Grid>
			<Button x:Name="btnGetGift" Content="立即获取" Click="btnGetGift_Click" HorizontalAlignment="Left" Height="111" Margin="502,435,0,0" VerticalAlignment="Top" Width="357" FontSize="48" FontWeight="Bold" Background="#FFFF1111" BorderBrush="{x:Null}" Foreground="White" Grid.Row="1"/>

		</Grid>
	</Viewbox>
</common:LayoutAwarePage>
